<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <link rel="stylesheet" type="text/css" href="__CSS__/lib/normalize.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/mui-3.6.1.min.css" />
    <link rel="stylesheet" type="text/css" href="__CSS__/dingdan_wei.css" />
    <title>订单详情</title>
</head>

<body>
     <div class="zhezhao">
        <div class="x-zhezhao">
            <div class="tel-zhezhao">{$orderInfo[0]['shopTel']}</div>
            <div class="boda-zhezhao">
                <div class="quxiao">取消</div>
                <a href="tel:{$orderInfo[0]['shopTel']}" class="teltel"><div class="boda">拨打</div></a>
            </div>
        </div>
    </div>

    <div class="mui-content">
        <div class="top-bar mui-row">
            <div class="return mui-col-sm-2 mui-col-xs-2" onclick="javascript:location.href='/Wx/Index/index/r/order.html'"></div>
            <div class="top-middle mui-col-sm-8 mui-col-xs-8">
                <div class="s-top-middle">
                    {$orderInfo[0]['shopName']}
                </div>
            </div>
            <div onclick="showzz();" class="top-right mui-col-sm-2 mui-col-xs-2"><img class="tel" src="__IMG__/search/tel.png"/></div>
        </div>
    </div>



    <div class="wahaha">
        <div class="wahaha-1">订单状态</div>
        <div class="wahaha-2">
            <switch name="orderInfo[0]['orderStatus']" >
                <case value="0">订单已提交</case>
                <case value="1">商家已受理</case>
                <case value="5">取货中</case>
                <case value="6">请耐心等待收货</case>
                <case value="7">请耐心等待收货</case>
                <case value="8"><div class="qian-shou">用户已签收<br/><span>{$orderInfo[0]['signTime']}</span></div></case>
                <case value="-1">订单关闭</case>
                <case value="-2">订单未付款</case>
                <case value="-4">退款成功</case>
                <case value="-5">退款失败</case>
                <case value="-3">退款中</case>
                <case value="-6">退款中</case>
                <case value="-7">退款中</case>
                <default />处理中
            </switch>&nbsp;
            <p class="wahaha-2-p"></p></div>
    </div>
    <div class="b-tjdd">
        <div class="tjdd"><img src="__IMG__/search/1<if condition="$orderInfo[0]['orderStatus'] gt -1">-1</if>@2x.png"/><p>提交订单</p></div>
        <div class="tjdd"><div class="henxian"></div></div>
        <div class="tjdd"><img src="__IMG__/search/4<if condition="$orderInfo[0]['orderStatus'] gt 0">-4</if>@2x.png"/><p>商家接单</p></div>
        <div class="tjdd"><div class="henxian"></div></div>
        <div class="tjdd"><img src="__IMG__/search/2<if condition="$orderInfo[0]['orderStatus'] gt 1">-2</if>@2x.png"/><p>配送中</p></div>
        <div class="tjdd"><div class="henxian"></div></div>
        <div class="tjdd"><img src="__IMG__/search/3<if condition="$orderInfo[0]['orderStatus'] gt 7">-3</if>@2x.png"/><p>已送达</p></div>
    </div>

    <div class="dwzd" onclick="location.href='/Wx/Shop/shop/id/{$orderInfo[0]['shopId']}'">
        <div class="dwzd-l"><img src="/{$orderInfo[0]['shopImg']}"/>{$orderInfo[0]['shopName']}</div>

        <div class="dwzd-r"><img src="__IMG__/search/8-3@2x.png"/></div>

    </div>
    <div style="clear: both;"></div>
    <volist name="orderInfo[0]['goods']"  id='go'>
        <div class="wwzs">
            <div class="d-wwzs">{$go.goodsName}<if condition="$go.goodsAttrName != ''">【{$go.goodsAttrName}】</if></div>
            <div class="jg-wwzs">￥{$go.goodsPrice}</div>
            <div class="sl-wwzs">x{$go.goodsNums}</div>
        </div>
    </volist>

    <div class="psf">
        <div class="s-psf">配送费</div>
        <div class="jg-psf">￥{$orderInfo[0]['deliverMoney']|default=0}</div>
    </div>

    <div class="sfk">
        <div class="jg-psf">实付<span class="r-psf">￥{$orderInfo[0]['needPay']}</span></div>
    </div>

    <div class="psfs psfs-f1">

        <div class="psfs-l psfs-f">配送方式:&nbsp;</div><div class="psfs-r psfs-f"><if condition="$orderInfo[0]['deliverType'] == 1">平台配送<elseif condition="$orderInfo[0]['deliverType'] == 2"/>商家配送</if></div>
    </div>
    <!-- 配送员 -->
    <if condition="$orderInfo['staff']">
         <div class="psfs">
            <div class="psfs-l ">配送员:&nbsp;</div><div class="psfs-r ">{$orderInfo['staff']['psy']}  {$orderInfo['staff']['psy_phone']}</div>
        </div>
    </if>



    <div class="psfs psfs-f1">
        <div class="psfs-l">订单号:&nbsp;</div><div class="psfs-r">{$orderInfo[0]['orderNo']}</div>
    </div>

    <div class="psfs">
        <div class="psfs-l">联系人:&nbsp;</div><div class="psfs-r">{$orderInfo[0]['userName']}</div>
    </div>

    <div class="psfs">
        <div class="psfs-l">联系电话:&nbsp;</div><div class="psfs-r">{$orderInfo[0]['userPhone']}</div>
    </div>
    <div class="psfs">
        <div class="psfs-l">收货地址:&nbsp;</div><div class="psfs-r">{$orderInfo[0]['userAddress']}</div>
    </div>
    <div class="psfs">
        <div class="psfs-l">支付方式:&nbsp;</div>
        <div class="psfs-r">
            <if condition="$orderInfo[0]['isPay'] == 1">
                <if condition="$orderInfo[0]['payType'] == 1">支付宝
                    <elseif condition="$orderInfo[0]['payType'] == 2" />微信支付
                    <elseif condition="$orderInfo[0]['payType'] == 3" />余额支付
                    <elseif condition="$orderInfo[0]['payType'] == 0" />货到付款
                    <else /> 其它
                </if>
                <else/>待付款
            </if>
        </div>
    </div>
    <div class="psfs">
        <div class="psfs-l">下单时间:&nbsp;</div><div class="psfs-r">{$orderInfo[0]['createTime']}</div>
    </div>
    <div class="psfs psfs-mw">
        <div class="psfs-l">送达时间:&nbsp;</div><div class="psfs-r"><if condition="$orderInfo[0]['orderStatus'] lt 2">尽快送出<else/>预计送达</if></div>
    </div>


    <if condition="$orderInfo[0]['orderStatus'] == -2">
        <div class="quxd">
            <div class="quxd-1" onclick="cancelOrder({$orderInfo[0]['orderId']})"><img style="display: none;" class="tousu" src="__IMG__/search/tousu@2x.png"/>取消订单</div>
           <a href="{:U('Orders/caretePayInfo',array('ids'=>$orderInfo[0]['orderId'],'ref'=>'Orders_orderDetail_'.$orderInfo[0]['orderId']))}"> <div class="quxd-2" >去付款</div></a>
        </div>
    </if>


    <if condition="$orderInfo[0]['orderStatus'] == 1  || $orderInfo[0]['orderStatus'] == 0">
        <div class="quxd">
            <div class="quxd-1 t-center" onclick="location.href='/Wx/Orders/refund?id={$orderInfo[0]['orderId']}&ref=/Wx/Orders/orderDetail/id/{$orderInfo[0]['orderId']}'"><img style="display: none;" class="tousu" src="__IMG__/search/tousu@2x.png"/>申请退款</div>
        </div>
    </if>


    <if condition="$orderInfo[0]['orderStatus'] lt 8 && $orderInfo[0]['orderStatus'] gt 1">
        <div class="quxd">
            <div class="quxd-1" onclick="location.href='/Wx/Orders/refund?id={$orderInfo[0]['orderId']}&ref=/Wx/Orders/orderDetail/id/{$orderInfo[0]['orderId']}'"><img style="display: none;" class="tousu" src="__IMG__/search/tousu@2x.png"/>申请退款</div>
           <a href="javascript:conFirmOrder({$orderInfo[0]['orderId']})"> <div class="quxd-2" >确认收货</div></a>
        </div>
    </if>


    <if condition="$orderInfo[0]['orderStatus'] == 8">
        <div class="quxd">
            <!-- 是否投诉 -->
            <if condition="$orderInfo[0]['tousu'] == 0">
                <div class="quxd-1"  onclick="touSu2({$orderInfo[0]['orderId']},{$orderInfo[0]['shopId']},'{$orderInfo[0]['shopName']}')" ><img  class="tousu" src="__IMG__/search/tousu@2x.png"/>投诉</div>
                <else/>
                 <div class="quxd-1 "  > <img style="display: none;" class="tousu" src="__IMG__/search/tousu@2x.png"/>已投诉</div>
            </if>

            <if condition="$orderInfo[0]['isPJ'] eq 0">
                <a href="{:U('Comment/orderComment',array('orderId'=>$orderInfo[0]['orderId'],'shopId'=>$orderInfo[0]['shopId'], 'ref'=>'Orders_orderDetail_'.$orderInfo[0]['orderId']))}"> <div class="quxd-2" >去评价</div></a>
            <else/>
                <a href="{:U('Comment/orderComment',array('orderId'=>$orderInfo[0]['orderId'],'shopId'=>$orderInfo[0]['shopId'], 'ref'=>'Orders_orderDetail_'.$orderInfo[0]['orderId']))}"> <div class="quxd-2" >已评价</div></a>
            </if>

        </div>
    </if>
     <script>
         function touSu2(orderId,shopId,name){
             window.location.href='/Wx/Shop/complaint/shopId/'+shopId+'/orderId/'+orderId+'/name/'+name;
  /*           mui.confirm('投诉该商家？', '投诉商家', ['否','是'],
                 function(e) {
                     if (e.index == 1) {
                         window.location.href='/Wx/Shop/complaint/shopId/'+shopId+'/orderId/'+orderId+'/name/'+name;
                     }
                 })*/
         }
     </script>


<script type="text/javascript" src="__JS__/jquery2.1.1.min.js"></script>
<script type="text/javascript" src="__JS__/mui-3.6.1.min.js"></script>
<script type="text/javascript" src="__JS__/dingdan_wei.js"></script>
</body>

</html>
